<?php

namespace Biz\model\activity;

use Doraemon\pockets\datebase\BaseDbModel;

class CouponSend extends BaseDbModel
{
    const _CONFIG_FILE_ = 'db_shop';

    const _CONFIG_SELECT_ = 'db_activity';

    const _DATABASE_ = 'shop_activity';

    const _TABLE_NAME = 'coupon_send';



    //状态码
    const STATUS_SEND = 1;//已发送
    const STATUS_UNSEND = 2;//未发送
    const STATUS_SENDING = 3;//发送中
    const STATUS_DELETE = 9;//已删除


    //状态描述
    public static $statusDesc = [
        self::STATUS_SENDING =>'发送中',
        self::STATUS_SEND => '已发送',
        self::STATUS_UNSEND   => '未发送',
        self::STATUS_DELETE =>'已删除'
    ];



    public static function formatInfo(&$info){
        foreach ($info as $key => $value) {
            switch ($key) {
                case 'status':
                    $info['status_desc'] = isset(self::$statusDesc[$value]) ? self::$statusDesc[$value] : '';
                    break;

            }
        }
    }

}